home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Measure.dxr / 00003_Navigation handlers.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  2.1 KB  |  104 lines

  1. global gMasterData, gSection, gMeasureQuestions
  2.  
  3. on goIntro
  4.   go(label("intro"))
  5.   set gSection to #intro
  6.   goNarrator(gMasterData, "17")
  7. end
  8.  
  9. on goX
  10.   go(label("1"))
  11.   set gSection to #X
  12.   setUpQuestions()
  13. end
  14.  
  15. on setUpQuestions
  16.   set gMeasureQuestions to [#questionNum: 1, #artSprite: 6, #numofquestions: 12, #score: 0]
  17. end
  18.  
  19. on questionNext
  20.   if the questionNum of gMeasureQuestions < the numofquestions of gMeasureQuestions then
  21.     set the questionNum of gMeasureQuestions to the questionNum of gMeasureQuestions + 1
  22.     nextQuest()
  23.     if not activationOn(gMasterData) then
  24.       activate(gMasterData)
  25.     end if
  26.   else
  27.     go("score")
  28.   end if
  29. end
  30.  
  31. on nextQuest
  32.   go("quest")
  33.   set the member of sprite the artSprite of gMeasureQuestions to member ("quest" && the questionNum of gMeasureQuestions)
  34.   updateStage()
  35.   case the questionNum of gMeasureQuestions of
  36.     1:
  37.       goNarrator(gMasterData, "17a")
  38.     2:
  39.       goNarrator(gMasterData, "17b")
  40.     3:
  41.       goNarrator(gMasterData, "17c")
  42.     4:
  43.       goNarrator(gMasterData, "17d")
  44.     5:
  45.       goNarrator(gMasterData, "17e")
  46.     6:
  47.       goNarrator(gMasterData, "17f")
  48.     7:
  49.       goNarrator(gMasterData, "17g")
  50.     8:
  51.       goNarrator(gMasterData, "17h")
  52.     9:
  53.       goNarrator(gMasterData, "17i")
  54.     10:
  55.       goNarrator(gMasterData, "17j")
  56.     11:
  57.       goNarrator(gMasterData, "17k")
  58.     12:
  59.       goNarrator(gMasterData, "17l")
  60.   end case
  61. end
  62.  
  63. on clickOne
  64.   go("1 anim")
  65.   addToScore(1)
  66. end
  67.  
  68. on clickTwo
  69.   go("2 anim")
  70.   addToScore(2)
  71. end
  72.  
  73. on clickThree
  74.   go("3 anim")
  75.   addToScore(3)
  76. end
  77.  
  78. on clickFour
  79.   go("4 anim")
  80.   addToScore(4)
  81. end
  82.  
  83. on addToScore num
  84.   set the score of gMeasureQuestions to the score of gMeasureQuestions + num
  85.   put num into line the questionNum of gMeasureQuestions of field "print2 field"
  86. end
  87.  
  88. on goTofinalScore
  89.   set gSection to #score
  90.   set theScore to the score of gMeasureQuestions
  91.   case 1 of
  92.     (theScore > 35):
  93.       go("good")
  94.       goNarrator(gMasterData, "18")
  95.     (theScore > 20):
  96.       go("fair")
  97.       goNarrator(gMasterData, "19")
  98.     otherwise:
  99.       go("bad")
  100.       goNarrator(gMasterData, "20")
  101.   end case
  102.   put theScore into field "score field"
  103. end
  104.